<?php
/**
* @version		$Id: mod_login.php 6177 2007-01-04 12:01:01Z louis $
* @package		Joomla
* @copyright	Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

// Include the syndicate functions only once
require_once (dirname(__FILE__).DS.'helper.php');


//$params->def('greeting', 1);

//$type 	= modLoginHelper::getType();
$component_url	= modBookstoreHelper::getReturnURL($params, $type);
$layout = $params->get('mod_layout', 0);
//if( empty($params['mod_layout']) ){
	//$params['mod_layout'] = 0; 
//}

jimport( 'joomla.filesystem.folder' );

$element_path = JPATH_ROOT.DS.'modules'.DS.'mod_bookstore'.DS.'elements';

$files = JFolder::files( $element_path );

foreach($files as $file){
	//echo $file;
	require_once( $element_path.DS.$file);
}

//var_dump($layout);
//$user =& JFactory::getUser();
//var_dump(modBookstoreHelper::getFormLayout( (int)$layout) );
//require(JModuleHelper::getLayoutPath('mod_bookstore'));
require( modBookstoreHelper::getFormLayout((int)$layout) );

?>